﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductInfo.aspx.cs" Inherits="ModernShopping.ProductInfo" MasterPageFile="~/ModernShopping.Master" %>

<%@ Register Src="~/WebUserControls/UCPopup.ascx" TagName="Popup" TagPrefix="MyUserControls" %>
<asp:Content runat="server" ContentPlaceHolderID="HeaderContent">
    <link href="Css/ModernShopping.css" rel="stylesheet" type="text/css" />
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic' rel='stylesheet' type='text/css' />
    <style type="text/css">
        .uc-tai-khoan {
            height: 70px;
            font-family: 'Roboto', sans-serif;
            width: 20%;
            margin: auto;
            position: relative;
            text-align: right;
            font-weight: 700;
            top: 2px;
            left: 400px;
        }

        .auto-style3 {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="MainContent">
    <div class="div-center">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="title">
            <asp:Label ID="lbl"
                runat="server"
                Text="THÔNG TIN SẢN PHẨM" Height="100%" Width="100%" />
        </div>
        <div class="register">
            <div style="width: 90%; margin: 30px auto 30px auto;">
                <table class="auto-style1">
                    <tr>
                        <td colspan="4">
                            <asp:Label ID="Label4" CssClass="subheader" runat="server" Text="THÔNG TIN"
                                Width="100%" BorderStyle="None"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="table-title-col">
                            <asp:Label ID="Label14" runat="server" Text="Tên sản phẩm:"></asp:Label>
                        </td>
                        <td class="table-input-col" colspan="3">
                            <asp:Label ID="lblProductName" runat="server" Width="100%"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="table-title-col">
                            <asp:Label ID="Label6" runat="server" Text="Xuất xứ:"></asp:Label>
                        </td>
                        <td class="table-input-col">
                            <asp:Label ID="lblMadeIn" runat="server" Width="250px"></asp:Label>
                        </td>
                        <td class="table-title-col">
                            <asp:Label ID="Label7" runat="server" Text="Giá bán:"></asp:Label>
                        </td>
                        <td class="table-input-col">
                            <asp:Label ID="lblPrice" runat="server" Width="250px"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="table-title-col">
                            <asp:Label ID="Label13" runat="server" Text="Nhận xét:"></asp:Label>
                        </td>
                        <td class="table-input-col">
                            <asp:LinkButton ID="lbNhanXet" runat="server">Nhận xét sản phẩm</asp:LinkButton>
                        </td>
                        <td class="table-title-col">&nbsp;</td>
                        <td class="table-input-col">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="table-title-col" colspan="4">
                            <asp:Label ID="Label12"
                                CssClass="subheader"
                                runat="server"
                                Text="NƠI BÁN"
                                Width="100%"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <asp:GridView runat="server" ID="gvMyStores" Width="100%"
                                AutoGenerateColumns="False"
                                BorderColor="#2C7C00" BorderWidth="1px" AllowPaging="True" PageSize="5">
                                <AlternatingRowStyle BackColor="#FFFF99" />
                                <Columns>
                                    <asp:TemplateField HeaderText="STT">
                                        <ItemTemplate>
                                            <%# Container.DataItemIndex+1 %>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="TÊN CỬA HÀNG" DataField="Name">
                                        <ItemStyle Width="250px" CssClass="style" HorizontalAlign="Left" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="ĐIẠ CHỈ" DataField="Address">
                                        <ItemStyle HorizontalAlign="Left" CssClass="style" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="THAO TÁC" ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbSelect"
                                                runat="server"
                                                CommandArgument='<%# Eval("Code")%>'
                                                CausesValidation="False"
                                                OnClick="lbSelect_Click"
                                                Text="Xem"></asp:LinkButton>
                                        </ItemTemplate>
                                        <ItemStyle Width="100px" />
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="#00A8DF" ForeColor="White" Height="35px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Italic="False" Font-Size="15pt" />
                                <RowStyle Height="35px" Font-Size="13pt" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <asp:Label ID="Label11"
                                CssClass="subheader"
                                runat="server"
                                Text="MÔ TẢ"
                                Width="100%"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <div runat="server" id="divContents" style="width: 100%; height: 100%;">
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <ajaxToolkit:ModalPopupExtender ID="PopupUpdate" runat="server" PopupControlID="PanelLocationStore"
        CancelControlID="btnClose" TargetControlID="hidden" BackgroundCssClass="modalBackground" />
    <asp:Panel ID="PanelLocationStore" runat="server" CssClass="modalPopup" align="center"
        Style="display: none" Width="95%" Height="85%" HorizontalAlign="Center">
        <div style="float: right; position: absolute; margin-top: -30px; margin-right: -20px; right: 1px;">
            <asp:ImageButton ID="btnClose" ImageUrl="~/images/web/Close.png" runat="server"
                Height="30px" Width="30px" />
        </div>
        <asp:HiddenField ID="hidden" runat="server" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <iframe width="100%" id="iFrame" runat="server" height="545px" src="StoreInMap.aspx" style="float: left;"></iframe>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <ajaxToolkit:ModalPopupExtender
        ID="ModalPopupExtender"
        runat="server"
        PopupControlID="PanelFacebookComment"
        TargetControlID="lbNhanXet"
        CancelControlID="btnCloseComment"
        BackgroundCssClass="modalBackground" />
    <asp:Panel
        ID="PanelFacebookComment"
        runat="server"
        CssClass="modalPopup"
        align="center"
        Style="display: none;"
        Width="80%"
        Height="90%"
        HorizontalAlign="Center">
        <div style="float: right; position: absolute; margin-top: -30px; margin-right: -20px; right: 1px;">
            <asp:ImageButton ID="btnCloseComment" ImageUrl="~/images/web/Close.png" runat="server"
                Height="30px" Width="30px" />
        </div>
        <asp:HiddenField ID="HiddenField" runat="server" />
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <asp:TextBox runat="server" CssClass="textbox" Style="margin-left: 0px; max-height: 70px;"
                    ID="txtComment" Width="98%" Height="50px" TextMode="MultiLine"></asp:TextBox>
                <table style="width: 100%;">
                    <tr>
                        <td style="text-align: right; width: 50%">Tên người nhận xét</td>
                        <td style="text-align: right; width: 30%">
                            <asp:TextBox ID="txtUserName" runat="server" CssClass="textbox"></asp:TextBox>
                        </td>
                        <td style="width: 40%">
                            <asp:Button runat="server" Style="float: right; margin: 15px 30px 15px 0px;" ID="btnComment" OnClick="btnComment_Click" CssClass="button" Text="NHẬN XÉT" /></td>
                    </tr>
                </table>
                <div style="overflow-y: scroll; max-height: 430px;">
                    <asp:GridView ID="gv_Comments" runat="server" AutoGenerateColumns="False"
                        BorderColor="#2C7C00" BorderWidth="1px" AllowPaging="True" PageSize="5" Width="100%">
                        <AlternatingRowStyle BackColor="#FFFF99" />
                        <HeaderStyle BackColor="#00A8DF" ForeColor="White" Height="35px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Italic="False" Font-Size="15pt" />
                        <Columns>
                            <asp:TemplateField HeaderText="NHẬN XÉT" ShowHeader="False">
                                <ItemTemplate>
                                    <table class="auto-style3">
                                        <tr>
                                            <td style="text-align: left">
                                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Comment")%>' Width="100%"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: left">Nhận xét bởi
                                            <asp:Label ID="Label2" Text='<%# Eval("UserName")%>' runat="server"></asp:Label>
                                                &nbsp;-&nbsp; Vào lúc
                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("Time","{0:HH:mm:ss    dd/MM/yyyy}")%>'></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnComment" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </asp:Panel>
    <MyUserControls:Popup runat="server" ID="MyPopup" />
</asp:Content>
